﻿@model OJS.Web.ViewModels.Account.LoginViewModel

@using Resource = Resources.Account.Views.Login

@{
    ViewBag.Title = Resource.Log_in;
}

<ol class="breadcrumb">
    <li><a href="/">Начало</a></li>
    <li class="active">@ViewBag.Title</li>
</ol>

<h2>@ViewBag.Title</h2>

<div class="row">
    <div class="col-md-8">
        <section id="loginForm">
            @using (Html.BeginForm("Login", "Account", new { ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()
                <h4>@Resource.Login_using_username_and_password</h4>
                <hr class="col-md-8"/>
                <div class="clearfix"></div>
                @Html.ValidationSummary(true)
                <div class="form-group">
                    @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
                    <div class="col-md-6">
                        @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.UserName)
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
                    <div class="col-md-6">
                        @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
                        @Html.ValidationMessageFor(m => m.Password)
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <div class="checkbox">
                            @Html.CheckBoxFor(m => m.RememberMe)
                            @Html.LabelFor(m => m.RememberMe)
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="@Resource.Log_in" class="btn btn-default" />
                    </div>
                </div>
                <p>
                    @Html.ActionLink(Resource.Register, "Register") @Resource.If_not_already_registered
                </p>
                <p>
                    @Html.ActionLink(Resource.Forgotten_password, "ForgottenPassword")
                </p>
            }
        </section>
    </div>
    <div class="col-md-4">
        <section id="socialLoginForm">
            @Html.Partial("_ExternalLoginsListPartial", new { Action = "ExternalLogin", ViewBag.ReturnUrl })
        </section>
    </div>
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}